The goal is to shows a way to consume SAP HANA Cloud data from a python session executed from my laptop.
The steps I am going to perform are:
1- Generate a data set in SAP HANA Cloud and configure the HANA instance
First i access to my instance in SAP HANA Cloud, using SAP HANA Database Explorer, and launch a script in order to generate test data. The script generates HOTEL scheme and all tables that we are going to fill in (Hotel, customer, city, reservation)
I see all generated data from reservation table
I configure my HANA instance to allow access from all IP addresses
2- Download HANA client for python
In our laptop, we download a package (hdbcli) that includes the HANA client and check the version. In my case, using anaconda prompt:
3- Create a connection from Python
I open a Spyder session and test the connection with SAP HANA cloud using "hdcli".
The conection parameters for a trial SAP HANA Cloud account are:
HANA_address = 'acXXXX.hana.trial-eu10.hanacloud.ondemand.com'
HANA_port = '443'
HANA_user = 'DBADMIN'
HANA_password = 'XXXX'
I reconnect again and execute a SQL script in order to check received data from reservation table... and voilà!
After connecting to SAP HANA cloud and importing data, any kind of machine learning techniques could be used in Spyder (or in any other python IDE).
I hope it will be useful for you and thanks for sharing!